package com.example.hospital.api.controller.from;

import lombok.Data;
import org.springframework.context.annotation.Bean;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @FileName LoginFrom
 * @folder
 * @Description
 * @Author yf
 * @return
 * @date 2024-08-16
 **/
@Data
public class LoginFrom {
    @NotBlank(message = "username不能为空")
    @Pattern(regexp = "^[a-zA-Z0-9]{5,50}$",message = "username内容不正确")
    private String username;

    @NotBlank(message = "password不能为空")
    @Pattern(regexp = "^[a-zA-Z0-9]{6,20}$",message = "password内容不正确")
    private String password;
}
